package com.bbx.taxi.client.Task;

import com.bbx.api.sdk.model.passanger.LeadStopsGetNearbysBuild;
import com.bbx.api.sdk.net.passeger.conn.LeadStopsGetNearbysNet;

import android.content.Context;

/**
 * @Description
 * @Path com.bbx.taxi.client.Task.LeadStopsGetNearbysTask.java
 * @Author lbb
 * @Date 2016年6月8日 下午2:00:00
 * @Company 蓝海（福建）信息技术有限公司
 */
public class LeadStopsGetNearbysTask  extends BaseAsyncTask {
	public interface Back{
		public void success(Object object);
		public void fail(int status, String msg);
	}

	protected LeadStopsGetNearbysBuild build;
	protected Back back;
	public LeadStopsGetNearbysTask(Context context,LeadStopsGetNearbysBuild build,boolean isShow,Back back) {
		super(context,isShow);
		this.build=build;
		this.back=back;
	}

	@Override
	public void onSuccess(int status,Object object) {
		// TODO Auto-generated method stub
		if(this.back!=null){
			this.back.success(object);
		}
	}

	@Override
	public void onFailed(int status, String msg) {
		// TODO Auto-generated method stub
		if(this.back!=null){
			this.back.fail(status, msg);
		}
	}

	@Override
	protected Object doInBackground(Object... params) {
		// TODO Auto-generated method stub
		return new LeadStopsGetNearbysNet(context,build.toJson());
	}

}
